package com.smart.service;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.smart.dao.HouseDAO;
import com.smart.dao.UserDAO;
import com.smart.model.House;
import com.smart.util.DBUtil;

public class HouseService {
	 static HouseDAO houseDAO=null;
	 static
	 {
		 houseDAO=new HouseDAO();
	 }
	 
	 //���ҷ����id
	public int getHouseId(int building_no,int room_no)
	{
		int x=-1;
		try {
			x=houseDAO.getHouseId(building_no, room_no);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return x;
	}
	
	public House getHouse(int house_id) throws SQLException
	{
		return houseDAO.getHouse(house_id);
	}
}
